home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
ctutor.exe
/
SOURCE
/
DOWHILE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-15
|
417b
|
26 lines
/* Chapter 3 - Program 2 - DOWHILE.C */
/* This is an example of a do-while loop */
void main()
{
int i;
i = 0;
do {
printf("The value of i is now %d\n", i);
i = i + 1;
} while (i < 5);
}
/* Result of execution
The value of i is now 0
The value of i is now 1
The value of i is now 2
The value of i is now 3
The value of i is now 4
*/